package cn.swpu.blog.enums;

import lombok.Getter;

/**
 * @Author 冰翔
 * @Date Created in 7:57 下午 2020/12/10
 */
@Getter
public enum ResponseEnum {

    //枚举含义为英语单词意思
    ERROR(-1, "服务器错误"),

    SUCCESS(0, "请求成功"),

    SAVE_BLOG_SUCCESS(1,"储存博客成功"),

    CATEGORY_NOT_FOUND(51, "分类不存在"),

    TAG_NOT_FOUND(52, "标签不存在"),

    CATEGORY_TAG_NOT_FOUND(53, "标签分类不存在"),

    BLOG_NOT_FOUND(54, "博客不存在"),

    CSRF_STATE_EXCEPTION(55,"CSRF异常"),

    ;

    private final Integer code;

    private final String desc;

    ResponseEnum(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }
}
